From 9395d780441f5ab455512b14cab69dc3ec0ee300 Mon Sep 17 00:00:00 2001 From: robertl Date: Wed, 20 Jan 2010 20:22:11 +0000 Subject: [PATCH] Make use of config.h files optional to allow third party build tools. --- Makefile.in | 2 +- cet_util.h | 2 ++ defs.h | 2 ++ exif.c | 1 - gbfile.h | 1 - gbsleep.c | 2 ++ jeeps/gpslibusb.c | 2 ++ jeeps/gpsusbstub.c | 4 ++++ 8 files changed, 13 insertions(+), 3 deletions(-) diff --git a/Makefile.in b/Makefile.in index 71ec94a6f..75e0631d2 100644 --- a/Makefile.in +++ b/Makefile.in @@ -35,7 +35,7 @@ OUTPUT_SWITCH=-o # #DEBUGGING=-g $(EXTRA_DEBUGGING) # add -DDEBUG_MEM to turn on memory allocation logging GBCFLAGS=$(EXTRA_CFLAGS) $(DEBUGGING) -I. -I$(srcdir) \ - $(OPTIMIZATION) @CFLAGS@ + $(OPTIMIZATION) -DHAVE_CONFIG_H @CFLAGS@ LDFLAGS=$(EXTRA_LDFLAGS) @LDFLAGS@ PREFIX=@prefix@ INSTALL_DIR=$(DESTDIR)/$(PREFIX) diff --git a/cet_util.h b/cet_util.h index 389418157..1fc12062f 100644 --- a/cet_util.h +++ b/cet_util.h @@ -24,7 +24,9 @@ #include #include +#if HAVE_CONFIG_H #include "config.h" +#endif #if HAVE_LIBEXPAT # include diff --git a/defs.h b/defs.h index 0c15fa127..24d39ce49 100644 --- a/defs.h +++ b/defs.h @@ -25,7 +25,9 @@ #include #include #include +#if HAVE_CONFIG_H #include "config.h" +#endif #include "queue.h" #include "gbtypes.h" #if HAVE_LIBZ diff --git a/exif.c b/exif.c index 105a92498..23b29497e 100644 --- a/exif.c +++ b/exif.c @@ -26,7 +26,6 @@ #include #include "defs.h" -#include "config.h" #include "garmin_tables.h" #include "jeeps/gpsmath.h" #include "strptime.h" diff --git a/gbfile.h b/gbfile.h index 639aa7bd4..432c44e6e 100644 --- a/gbfile.h +++ b/gbfile.h @@ -26,7 +26,6 @@ #include #include #include -#include "config.h" #include "defs.h" #include "cet.h" diff --git a/gbsleep.c b/gbsleep.c index a4b9ed6be..63f1fa0ba 100644 --- a/gbsleep.c +++ b/gbsleep.c @@ -18,7 +18,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA */ +#if HAVE_CONFIG_H #include "config.h" +#endif #if __WIN32__ diff --git a/jeeps/gpslibusb.c b/jeeps/gpslibusb.c index 71710737d..579b731ce 100644 --- a/jeeps/gpslibusb.c +++ b/jeeps/gpslibusb.c @@ -22,7 +22,9 @@ #include #include +#if HAVE_CONFIG_H #include "config.h" +#endif #if HAVE_LIBUSB #include #include "gps.h" diff --git a/jeeps/gpsusbstub.c b/jeeps/gpsusbstub.c index 060bab422..0838c1b5a 100644 --- a/jeeps/gpsusbstub.c +++ b/jeeps/gpsusbstub.c @@ -20,8 +20,12 @@ */ +#if HAVE_CONFIG_H #include "config.h" +#endif + #include "../defs.h" + #if !HAVE_LIBUSB const char no_usb[] = "USB support is not available in this build.\n"; -- 2.30.2